import React, {useRef} from 'react';
import {Modal, Form, Radio, Input, Button} from 'antd';

const PurchaseApplyForm = (props) => {
  const {modalVisible, onCancel, title, onSubmit} = props;
  return (
    <Modal
      destroyOnClose
      title={title}
      width={800}
      visible={modalVisible}
      onCancel={() => onCancel()}
      footer={
        [
          <Button key="save" type="primary" onClick={()=> onSubmit(1)}>
            保存并提交
          </Button>,
          <Button key="draft" onClick={()=> onSubmit(0)}>
            存为草稿
          </Button>,
          <Button
            key="cancel" onClick={() => onCancel()}
          >
            取消
          </Button>
        ]}
      wrapClassName={'purchaseModal'}
    >
      {props.children}
    </Modal>
  );
};
export default PurchaseApplyForm;
